#pragma once

#include <winsock2.h>
#include <ws2tcpip.h>
#include <stdlib.h>

namespace net 
{
	class PDAserver;
	class RTIcommand;
	class CallBack;
}

namespace net 
{
	class PDAserver
	{
	public:
		PDAserver(void);
		virtual ~PDAserver(void);
		void sendCommand(RTIcommand* comm);
		CallBack* getCallBack();
	private:
		int PDAserver::initConnection(SOCKET& ServerSock, SOCKADDR_IN& destination_sin);
		int startRTIservices(char* port);
		int startCallBackServices(char* port);
	private:
		// rti commands are sent through this socket
		SOCKET commandSocket;
		// callbacks received from this socket
		SOCKET callbackSocket;
	};
}
